/*
 * @Author: hui'chan lihuichan@yxhyidc.com
 * @Date: 2022-07-02 10:36:54
 * @LastEditors: 李惠婵 lihuichan@yxhyidc.com
 * @LastEditTime: 2022-08-18 14:14:41
 * @FilePath: \Wuhua_CountyGovg:\project\rural-revitalization-web\src\api\tenant\combo.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import request from '@/utils/request'
//查询套餐列表
export function listCombo(query) {
    return request({
        url: '/tenant/combo/list',
        method: 'get',
        params: query
    })
}
//获取套餐字典 
export function getComboDic() {
    return request({
        url: '/tenant/combo/dic',
        method: 'get',
    })
}
//新增套餐/tenant/combo/
export function addCombo(data) {
    return request({
        url: '/tenant/combo',
        method: 'post',
        data: data
    })
}
// 修改套餐
export function updateCombo(data) {
    return request({
        url: '/tenant/combo',
        method: 'put',
        data: data
    })
}

// 删除套餐
export function delCombo(ids) {
    return request({
        url: '/tenant/combo/' + ids,
        method: 'delete'
    })
}
//判断套餐是否关联租户
export function linkCombo(comboId) {
    return request({
        url: '/tenant/linkCombo?comboId=' + comboId,
        method: 'get',

    })
}
//更新租户套餐状态
export function updateComboStatus(comboId, status) {
    return request({
        url: '/tenant/combo/updateStatus?comboId=' + comboId + '&status=' + status,
        method: 'put'
    })
}
//计算套餐过期时间/tenant/combo/calculateExpired/{comboId}
export function calculateExpired(comboId) {
    return request({
        url: '/tenant/combo/calculateExpired/' + comboId,
        method: 'get',
    })
}
//获取租户功能菜单下拉树列表
export function tenantTreeSelect() {
    return request({
        url: '/system/menu/tenantTreeselect',
        method: 'get'
    })
}
